 <%@ include file="/common/taglibs.jsp"%>
<script>
jQuery(document).ready(function(){
	jQuery("#userForm").validate();
});
</script>
<script type="text/javascript" src="<c:url value='/scripts/selectbox.js'/>"></script>

<div style="padding:5px;" align="center">
	<!-- <span class="head-dec">Enter Student Details</span> --><br/><br/>
	<div style="padding-top:15px;">
		<s:form name="userForm" id="userForm" action="addCandidate" method="post" >
	        <s:hidden key="user.id"/>
	        <s:hidden key="user.version"/>
	        <input type="hidden" name="from" value="${param.from}"/>
	
	        <c:if test="${cookieLogin == 'true'}">
	            <s:hidden key="user.password"/>
	            <s:hidden key="user.confirmPassword"/>
	        </c:if>
	
	        <s:if test="user.version == null">
	            <input type="hidden" name="encryptPass" value="true" />
	        </s:if>
	      
	       	<table border="0">
	       		<!--<tr>
					<td class="inputField" nowrap="nowrap"> Username</td>
					<td class="inputTextBox"><s:textfield id="user.username" name="user.username" cssClass="text medium" required="true" style="width:250px;"/></td>
				</tr>
				--><tr><td>&nbsp;</td></tr>
	     		<tr>
					<td class="inputField" nowrap="nowrap">First Name</td>
					<td class="inputTextBox"><s:textfield id="user.firstName" name="user.firstName"  required="true" cssClass="text medium required" style="width:250px;"/></td>
				</tr>
				<tr><td>&nbsp;</td></tr>
	        	 <tr>
					<td class="inputField" nowrap="nowrap">Last Name</td>
					<td class="inputTextBox">  <s:textfield  id="user.lastName" name="user.lastName"  required="true" cssClass="text medium required" style="width:250px;"/></td>
				</tr>
				<tr><td>&nbsp;</td></tr>
				<tr>
					<td class="inputField" nowrap="nowrap">Class</td>
					<td class="inputTextBox">  
						<s:select id="user.classYear" name="user.classYear" emptyOption="true" list="classYears" listKey="id" displayName="Class" listValue="name" cssStyle="width:250px" />
					</td>
				</tr>
				<tr><td>&nbsp;</td></tr>
				<tr>
					<td class="inputField" nowrap="nowrap">Section</td>
					<td class="inputTextBox">
						<s:select id="user.section" name="user.section" emptyOption="true" list="sections" listKey="id" listValue="sectionName" cssStyle="width:250px" />
					</td>
				</tr>
				<tr><td>&nbsp;</td></tr>
	        	<tr>
					<td class="inputField" nowrap="nowrap">Email</td>
					<td class="inputTextBox">  <s:textfield id="user.email" name="user.email"  required="true" cssClass="text medium email required" style="width:250px;"/> </td>
				</tr>
				<tr><td>&nbsp;</td></tr>
	        	<tr>
					<td class="inputField" nowrap="nowrap">Mobile Number</td>
					<td class="inputTextBox">  <s:textfield id="user.phoneNumber"  name="user.phoneNumber"  cssClass="text medium required" style="width:250px;"/> </td>
				</tr>
				<tr><td>&nbsp;</td></tr>
	           	<tr>
					<td class="inputField" nowrap="nowrap">Address</td>
					<td class="inputTextBox">  <s:textarea id="user.address" name="user.address"  style="width:250px;" cssClass="required" /> </td>
				</tr>
				<tr>
					<td class="inputField" nowrap="nowrap">
     				Status
     				</td>
					<td class="inputTextBox">
					<s:radio  name="user.status" id="saveOrUpdateStaff__status" list="#{'Active':'Active','InActive':'InActive'}" value="%{user.getStatus()}" />
				</td>
				</tr>
				<tr><td>&nbsp;</td></tr>
				<tr>
					<td colspan="2">
						<s:reset value="Clear" id="saveCandidate_0" cssClass="button-gray" theme="simple"/>
						<s:if test="user.id == '' || user.id == null">
							<s:submit value="Create" id="saveCandidate_0" cssClass="button-green" theme="simple" />
						</s:if>
						<s:else>
							<s:submit value="Update" id="saveCandidate_0" cssClass="button-green" theme="simple" />
						</s:else>
						<input type="button" value="List" id="saveCandidate_0" class="button-gray" onclick="javascript:showLists('/showCandidateList');" />
					</td>
				</tr>
				<tr>
				
				
				</tr>
	    	</table>
		</s:form>
	</div>
</div>

